<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	template="/layout/template.xhtml">

	<ui:define name="body">

		<h:form id="courseAddStudent">

			<rich:panel>
				<h:panelGrid columns="1" width="%100">
					<s:decorate id="announcementField1" template="/layout/edit.xhtml">
						<ui:define name="label">#{messages['txt.announcementTitle']}</ui:define>
						<h:inputText value="#{announcementHome.instance.title}"   style="width: 500px;" required="true"/>
					</s:decorate>
					<s:decorate id="announcementField2" template="/layout/edit.xhtml" >
						<ui:define name="label">#{messages['txt.announcementDetail']}</ui:define>
						<h:inputTextarea value="#{announcementHome.instance.detail}"   style="width: 500px; height: 300px"/>
					</s:decorate>
				</h:panelGrid>
			</rich:panel>


			<div class="actionButtons">
				<h:commandButton id="save" value="Save"
					action="#{announcementHome.persistWithCourse}"
					rendered="#{!announcementHome.managed}">
				</h:commandButton>
				<h:commandButton id="update" value="Save"
					action="#{announcementHome.update}"
					rendered="#{announcementHome.managed}">
					<f:param name="courseId" value="#{courseHome.courseId}" />
				</h:commandButton>
				<h:commandButton id="delete" value="Delete"
					action="#{announcementHome.remove}" immediate="true"
					rendered="#{announcementHome.managed}">
				</h:commandButton>
				<s:button id="cancel" value="#{messages.Cancel}"
					view="/Course/course.xhtml" propagation="end">
				</s:button>
			</div>

		</h:form>

	</ui:define>

</ui:composition>
